package com.s69.controller;

import com.s69.entity.MedicalAssay;
import com.s69.service.MedicalAssayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
@RequestMapping("/medicalAssay")
public class MedicalAssayController {
    //展示所有的数据
    @Autowired
    MedicalAssayService medicalAssayService;
    @RequestMapping("/list")
    public String list(Long hospitalId, Model model){
        List<MedicalAssay> list= medicalAssayService.querryList(hospitalId);
        model.addAttribute("list",list);
        model.addAttribute("hospitalId",hospitalId);
        return "list";
    }
}
